package com.zczy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 财富中心
 * @TableName zczy_fortune
 */
@TableName(value ="zczy_fortune")
@Data
public class ZczyFortune implements Serializable {
    /**
     * 
     */
    @TableId(value = "fortune_id", type = IdType.AUTO)
    private Integer fortune_id;

    /**
     * 会员id
     */
    @TableField(value = "user_id")
    private Integer user_id;

    /**
     * 项目id
     */
    @TableField(value = "item_id")
    private Integer item_id;

    /**
     * 项目名称
     */
    @TableField(value = "item_name")
    private String item_name;

    /**
     * 年化收益率
     */
    @TableField(value = "year_rate")
    private BigDecimal year_rate;

    /**
     * 支持金额
     */
    @TableField(value = "support_amount")
    private BigDecimal support_amount;

    /**
     * 收益金额
     */
    @TableField(value = "get_money")
    private Double get_money;

    /**
     * 收益时间
     */
    @TableField(value = "get_time")
    private String get_time;

    /**
     * 股权占比
     */
    @TableField(value = "stock_right")
    private BigDecimal stock_right;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private String create_time;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private String create_by;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ZczyFortune other = (ZczyFortune) that;
        return (this.getFortune_id() == null ? other.getFortune_id() == null : this.getFortune_id().equals(other.getFortune_id()))
            && (this.getUser_id() == null ? other.getUser_id() == null : this.getUser_id().equals(other.getUser_id()))
            && (this.getItem_id() == null ? other.getItem_id() == null : this.getItem_id().equals(other.getItem_id()))
            && (this.getItem_name() == null ? other.getItem_name() == null : this.getItem_name().equals(other.getItem_name()))
            && (this.getYear_rate() == null ? other.getYear_rate() == null : this.getYear_rate().equals(other.getYear_rate()))
            && (this.getSupport_amount() == null ? other.getSupport_amount() == null : this.getSupport_amount().equals(other.getSupport_amount()))
            && (this.getGet_money() == null ? other.getGet_money() == null : this.getGet_money().equals(other.getGet_money()))
            && (this.getGet_time() == null ? other.getGet_time() == null : this.getGet_time().equals(other.getGet_time()))
            && (this.getStock_right() == null ? other.getStock_right() == null : this.getStock_right().equals(other.getStock_right()))
            && (this.getCreate_time() == null ? other.getCreate_time() == null : this.getCreate_time().equals(other.getCreate_time()))
            && (this.getCreate_by() == null ? other.getCreate_by() == null : this.getCreate_by().equals(other.getCreate_by()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFortune_id() == null) ? 0 : getFortune_id().hashCode());
        result = prime * result + ((getUser_id() == null) ? 0 : getUser_id().hashCode());
        result = prime * result + ((getItem_id() == null) ? 0 : getItem_id().hashCode());
        result = prime * result + ((getItem_name() == null) ? 0 : getItem_name().hashCode());
        result = prime * result + ((getYear_rate() == null) ? 0 : getYear_rate().hashCode());
        result = prime * result + ((getSupport_amount() == null) ? 0 : getSupport_amount().hashCode());
        result = prime * result + ((getGet_money() == null) ? 0 : getGet_money().hashCode());
        result = prime * result + ((getGet_time() == null) ? 0 : getGet_time().hashCode());
        result = prime * result + ((getStock_right() == null) ? 0 : getStock_right().hashCode());
        result = prime * result + ((getCreate_time() == null) ? 0 : getCreate_time().hashCode());
        result = prime * result + ((getCreate_by() == null) ? 0 : getCreate_by().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", fortune_id=").append(fortune_id);
        sb.append(", user_id=").append(user_id);
        sb.append(", item_id=").append(item_id);
        sb.append(", item_name=").append(item_name);
        sb.append(", year_rate=").append(year_rate);
        sb.append(", support_amount=").append(support_amount);
        sb.append(", get_money=").append(get_money);
        sb.append(", get_time=").append(get_time);
        sb.append(", stock_right=").append(stock_right);
        sb.append(", create_time=").append(create_time);
        sb.append(", create_by=").append(create_by);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}